import { createApp } from 'vue'
import App from './App.vue'

// 重置浏览器css样式
import 'normalize.css/normalize.css'

import './styles/index.scss'

import { store, key } from './store'
import router from './router'
// 如果要使用.scss样式文件，则需要引入base.scss文件
import 'element-plus/packages/theme-chalk/src/index.scss'
import { components, plugins } from './plugins/element-plus'

const app = createApp(App)

// 按需导入组件和插件
components.forEach((component) => {
  app.component(component.name, component)
})
plugins.forEach((plugin) => {
  app.use(plugin)
})

app.config.globalProperties.$ELEMENT = { 'z-index': 3000, size: 'small' }

app.use(store, key).use(router).mount('#app')
